<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        ul>li {
            list-style: none;
            float: left;
        }
        
        ul>li>a {
            text-decoration: none;
            display: block;
            height: 90px;
            line-height: 90px;
            /* border: springgreen 1px solid; */
        }
        
        .nav_spacing {
            width: 30px;
            height: 90px;
            /* border: steelblue 1px solid; */
        }
        
        .clear {
            clear: both;
        }
    </style>
</head>

<body>
    <ul>
        <li>
            <div class="clear nav_spacing"></div>
        </li>
        <li><a href="">全部课程</a></li>
        <li>
            <div class="clear nav_spacing"></div>
        </li>
        <li><a href="">项目实战</a></li>
        <li>
            <div class="clear nav_spacing"></div>
        </li>
        <li><a href="">阿里云</a></li>
        <li>
            <div class="clear nav_spacing"></div>
        </li>
        <li><a href="">书籍</a></li>
        <li>
            <div class="clear nav_spacing"></div>
        </li>
        <li><a href="">在线题库</a></li>
    </ul>

</body>

</html>